gl: Use a uniform to flip R and B colors on GLES
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 25 Apr 2016 12:38:22 +0000 (13:38 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 25 Apr 2016 13:33:36 +0000 (14:33 +0100)
commitf848450a70931133ab9368fd35b629c6c6e50fcb
tree648dbd35a3e44a168fa92f6d548639cb8e160bb9
parent1379b4b175910a253bb4aa8df3194eec2e160213
gl: Use a uniform to flip R and B colors on GLES

This allows us to decide when the R and B color channels should be
flipped with a much better granularity.

For instance, when using GLX_EXT_texture_from_pixmap to create a GL
texture from a surface we don't need to swap the R and B channels, as
the internal representation of the texture data will already have the
appropriate colors.

We also don't need to flip color channels when blitting from a texture.
gdk/gdkgl.c
gdk/gdkglcontextprivate.h
gdk/gdkinternals.h
gdk/resources/glsl/gles2-texture.fs.glsl
gdk/x11/gdkglcontext-x11.c